﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CRM.Business
{
    public class Login
    {
        /// <summary>
        /// 根据id查询符合该id的数据集
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        //public static CRM.DataLayer.Users GetUserByUserID(string userName, string password)
        //{
        //    var db = new CRM.DataLayer.CRMDateEntities();
        //    var result = db.Users.SingleOrDefault(p => p.userID == userName && p.password == password);
        //    if (result != null)
        //        return result;
        //    else
        //        return null;
        //}
        ///// <summary>
        ///// 根据id查找销售人员姓名
        ///// </summary>
        ///// <param name="id"></param>
        ///// <returns></returns>
        //public static CRM.DataLayer.Salesman GetSalesmanNameBySalesmanId(string id)
        //{
        //    var db = new CRM.DataLayer.CRMDateEntities();
        //    var reslut = db.Salesman.SingleOrDefault(p => p.salesmanID == id);
        //    if (reslut != null)
        //    {
        //        return reslut;
        //    }
        //    else
        //    {
        //        return null;
        //    }
        //}
    }
}
